const jwt = require('jsonwebtoken')

const SECRET = 'fuxiaofeng'

const verifyToken = (token) => {
  return jwt.verify(token, SECRET)
}
const signToken = (payload) => {
  return jwt.sign(payload, SECRET, { expiresIn: '7d' })
}

module.exports = {
  verifyToken, signToken
}